﻿@{
    Layout = null;

    List<NewsMine.DomainObjects.WebSiteInfo> websitesTemp = new List<NewsMine.DomainObjects.WebSiteInfo>();

    websitesTemp = ((QResult)Model).Websites;

    var languages = WebApp1.Models.LanguageModel.GetAllLanguages();

    string selectedLanguage = ((QResult)Model).CurrentLanguage;

                    //layout : 179 + 544 + 244
}

<div class="navbar">
              <div class="navbar-inner">
                <ul class="nav">
                
                @{
                    
                    foreach (var lang in languages)
                    {
                      if (lang.Name.ToLower() == selectedLanguage.ToLower())
                      {
                          <li class="active"><a href="/language/@lang.Name.ToLower()">@lang.LocalName.ToUpperInvariant()</a></li>
                      }
                      else
                      {
                            <li><a href="/language/@lang.Name.ToLower()">@lang.LocalName.ToUpperInvariant()</a></li>
                      }
                      
                      <li class="divider-vertical"></li>
                    }
                    
                   
                    
    }
                 </ul>
              </div>
            </div>

@{
      
    foreach (var lang in languages)
    {
        continue; //todo: this is temporary way of skipping this code... needs to be removed....
    <div class="btn-group" style="text-align:left;margin-left:10px;">
    
        @if (lang.Name.ToLower() == selectedLanguage.ToLower())
        {
            <a class="btn btn-primary" href="/language/@lang.Name.ToLower()" style="padding-left:14px;padding-right:6px;">@lang.LocalName.ToUpperInvariant()</a>
       @* <a class="btn btn-link dropdown-toggle" data-toggle="dropdown" href="#"><b><span
            class="caret"></span></b></a>*@
        }
        else
        {
        <a class="btn  btn-info" href="/language/@lang.Name.ToLower()" style="padding-left:14px;padding-right:6px;">@lang.LocalName.ToUpperInvariant()</a>
        @*<a class="btn btn-link dropdown-toggle " data-toggle="dropdown" href="#"><b><span
            class="caret"></span></b></a>*@
        }

        
       @* <ul class="dropdown-menu">
            
            @foreach (var website in websitesTemp)
            {
                if (!string.IsNullOrEmpty(website.Language) && website.Language.ToLower() == lang.Name.ToLower().ToString())
                {
                   
                    
                <li><a href="/source/@website.Domain" >
                    <img src='https://plus.google.com/_/favicon?alt=feed&domain=@website.Domain ' style="padding-right:5px;"/>@Html.Raw(website.Name)
                </a></li>
                        
                }
            }
        </ul>*@
    </div>
    
 
            
    }
}


